Ext.namespace("Ext.common");
Ext.common.SyncHttpProxy = function(config){
	config = config || {},
	Ext.common.SyncHttpProxy.superclass.constructor.apply(this,arguments);
}
Ext.extend(Ext.common.SyncHttpProxy, Ext.data.HttpProxy, {

			doRequest : function(action, rs, params, reader, cb, scope, arg) {
				var o = {
					method : (this.api[action])
							? this.api[action]['method']
							: undefined,
					request : {
						callback : cb,
						scope : scope,
						arg : arg
					},
					reader : reader,
					callback : this.createCallback(action, rs),
					scope : this,
					sync : false
				};

				if (params.jsonData) {
					o.jsonData = params.jsonData;
				} else if (params.xmlData) {
					o.xmlData = params.xmlData;
				} else {
					o.params = params || {};
				}
				this.conn.url = this.buildUrl(action, rs);
				if (this.useAjax) {
					Ext.applyIf(o, this.conn);
					if (this.activeRequest[action]) {

					}
					this.activeRequest[action] = Ext.Ajax.request(o);
				} else {
					this.conn.request(o);
				}

				this.conn.url = null;
			}
		})
